package controller;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.select.SelectorComposer;
import org.zkoss.zk.ui.select.annotation.Listen;
import org.zkoss.zk.ui.select.annotation.Wire;
import org.zkoss.zul.Label;
import org.zkoss.zul.Messagebox;
import org.zkoss.zul.Textbox;

public class TestController extends SelectorComposer<Component>{

	private static final long serialVersionUID = 1L;
	
	@Wire
    private Textbox txName;
	
	@Wire
	private Label lbHello;
	
	@Listen("onClick = #btSubmit")
    public void login(){
        lbHello.setValue("Hello "+txName.getValue());
        Messagebox.show("Error is pressed", "Error", Messagebox.OK, Messagebox.ERROR);
    }
}
